const mongoose = require('mongoose')
const {connect} = require('./config')
mongoose.set('useFindAndModify', false)
mongoose.connect(connect, {useUnifiedTopology: true, useNewUrlParser: true})
    .then(() => {
        console.log('数据库连接成功', connect)
    })
    .catch(() => {
        console.log('数据库连接失败')
    })
